home *** CD-ROM | disk | FTP | other *** search
- Path: news.inet.fi!usenet
- From: Harri Halttunen <Harri.Halttunen@enermet.fi>
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Performance: C vs. C++
- Date: Wed, 24 Jan 1996 10:12:12 +0200
- Organization: Telecom Finland News Service
- Message-ID: <3105E9DC.1BE3@enermet.fi>
- References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net> <4dnpl2$c8g@classic.iinet.com.au>
- NNTP-Posting-Host: halttha.enermet.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I)
-
- > Not quite. C is quite different from C++ from the performance point of
- > view. The difference is not only in virtual functions and exceptions
- > but in class construction, destruction, etc... and most significantly in
- > Runtime Type Checking. However, because machines are getting faster by
- > the day, this sort of "inefficiency" is hardly noticable.
-
- All that is true (at least in the some point of view), but we have to remember
- that usually in real applications this kind of comparison doesn't matter. This
- is because fetching something from a database or file takes many times longer
- than, for example, a virtual function call or to handle an excepion. Or even
- check a type of an object at runtime.
-
- I use C++ mainly, because it supports code and idea reuse better than other
- languages.
-